package com.sdhs.paas.authserver.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.sdhs.paas.authserver.entity.ClientService;
import com.sdhs.paas.authshare.common.msg.ObjectRestResponse;
import com.sdhs.paas.sdk.core.logger.Logger;
import com.sdhs.paas.sdk.core.logger.LoggerFactory;

/**
 * @author ace
 * @create 2017/12/26.
 */
@RestController
@RequestMapping("service")
public class ServiceController {
	private static Logger logger  = LoggerFactory.getLogger(ServiceController.class);
	
	
	
    @RequestMapping(value = "/{id}/client", method = RequestMethod.PUT)
    @ResponseBody
    public ObjectRestResponse modifyUsers(@PathVariable int id, String clients){
    	logger.info("id"+id+" clients--"+clients);
//        baseBiz.modifyClientServices(id, clients);
        return new ObjectRestResponse().rel(true);
    }

    @RequestMapping(value = "/{id}/client", method = RequestMethod.GET)
    @ResponseBody
    public ObjectRestResponse<ClientService> getUsers(@PathVariable int id){
    	logger.info("id"+id+" clients--");
    	ClientService clientService = new ClientService();
    	List<ClientService> list = new ArrayList<ClientService>();
//    	baseBiz.getClientServices(id);
        return new ObjectRestResponse<ClientService>().rel(true).data(list);
    }
}
